home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 4 / BBS in a Box - Macintosh - Volume IV (January 1992) (BBS in a Box).iso / Files / Hyper / A-An / Address Master.cpt / AddressMaster / AddressMaster / background_2747.txt < prev    next >
Encoding:
Text File  |  1988-02-27  |  16.3 KB  |  695 lines

  1. -- background: 2747 from stack: in
  2. -- bmap block id: 3380
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openCard
  8.   put SortItems (bkgnd field "Keyword") into bkgnd field "Keyword"
  9.   put the abbr date into T1
  10.   put line one of bkgnd field "Date Established" into T2
  11.   convert T2 to seconds
  12.   convert T1 to seconds
  13.   subtract T2 from T1
  14.   divide T1 by 86400
  15.   put T1 into line two of bkgnd field "Date Established"
  16.   put card field "Mainkeyword" of card "front" into bkgnd field "area-of-int"
  17. end openCard
  18.  
  19.  
  20.  
  21. -- part 46 (field)
  22. -- low flags: 81
  23. -- high flags: 0000
  24. -- rect: left=76 top=269 right=283 bottom=508
  25. -- title width / last selected line: 0
  26. -- icon id / first selected line: 0 / 0
  27. -- text alignment: 0
  28. -- font id: 3
  29. -- text size: 9
  30. -- style flags: 0
  31. -- line height: 12
  32. -- part name: sorted
  33.  
  34.  
  35. -- part 2 (field)
  36. -- low flags: 01
  37. -- high flags: 0002
  38. -- rect: left=431 top=19 right=35 bottom=493
  39. -- title width / last selected line: 0
  40. -- icon id / first selected line: 0 / 0
  41. -- text alignment: 0
  42. -- font id: 3
  43. -- text size: 12
  44. -- style flags: 0
  45. -- line height: 16
  46. -- part name: Date
  47.  
  48.  
  49. -- part 3 (button)
  50. -- low flags: 00
  51. -- high flags: 2000
  52. -- rect: left=490 top=319 right=342 bottom=512
  53. -- title width / last selected line: 0
  54. -- icon id / first selected line: 1013 / 1013
  55. -- text alignment: 1
  56. -- font id: 0
  57. -- text size: 12
  58. -- style flags: 0
  59. -- line height: 16
  60. -- part name: Next
  61. ----- HyperTalk script -----
  62. on mouseUp
  63.   visual effect dissolve very fast
  64.   go to next card
  65. end mouseUp
  66.  
  67.  
  68.  
  69. -- part 4 (button)
  70. -- low flags: 00
  71. -- high flags: 2000
  72. -- rect: left=423 top=319 right=342 bottom=456
  73. -- title width / last selected line: 0
  74. -- icon id / first selected line: 1014 / 1014
  75. -- text alignment: 1
  76. -- font id: 0
  77. -- text size: 12
  78. -- style flags: 0
  79. -- line height: 16
  80. -- part name: Prev
  81. ----- HyperTalk script -----
  82. on mouseUp
  83.   visual effect dissolve
  84.   go to prev card
  85. end mouseUp
  86.  
  87.  
  88.  
  89. -- part 5 (button)
  90. -- low flags: 00
  91. -- high flags: 2000
  92. -- rect: left=455 top=308 right=342 bottom=491
  93. -- title width / last selected line: 0
  94. -- icon id / first selected line: 21701 / 21701
  95. -- text alignment: 1
  96. -- font id: 0
  97. -- text size: 12
  98. -- style flags: 0
  99. -- line height: 16
  100. -- part name: New Button
  101. ----- HyperTalk script -----
  102. on mouseUp
  103.   visual effect dissolve
  104.   go home
  105. end mouseUp
  106.  
  107.  
  108.  
  109. -- part 6 (button)
  110. -- low flags: 00
  111. -- high flags: A002
  112. -- rect: left=187 top=320 right=342 bottom=299
  113. -- title width / last selected line: 0
  114. -- icon id / first selected line: 0 / 0
  115. -- text alignment: 1
  116. -- font id: 0
  117. -- text size: 12
  118. -- style flags: 0
  119. -- line height: 16
  120. -- part name: Address Master
  121. ----- HyperTalk script -----
  122. on mouseUp
  123.   visual effect dissolve
  124.   go card "front"
  125. end mouseUp
  126.  
  127.  
  128.  
  129. -- part 15 (button)
  130. -- low flags: 00
  131. -- high flags: 2000
  132. -- rect: left=13 top=295 right=327 bottom=45
  133. -- title width / last selected line: 0
  134. -- icon id / first selected line: 23270 / 23270
  135. -- text alignment: 1
  136. -- font id: 0
  137. -- text size: 12
  138. -- style flags: 0
  139. -- line height: 16
  140. -- part name: select areas
  141. ----- HyperTalk script -----
  142. on mouseUp
  143.  
  144.   hide bkgnd field "Com"
  145.   hide bkgnd field "comments"
  146.   ZoomRect the rect of bkgnd button "select areas", the rect of bkgnd field "area-of-int"
  147.   show bkgnd field "area-of-int"
  148.   show bkgnd button "Quit areas of interest"
  149.   put SortItems (bkgnd field "area-of-int",true) into bkgnd field "area-of-int"
  150.  
  151. end mouseUp
  152.  
  153.  
  154.  
  155. -- part 25 (button)
  156. -- low flags: 80
  157. -- high flags: A002
  158. -- rect: left=340 top=261 right=281 bottom=508
  159. -- title width / last selected line: 0
  160. -- icon id / first selected line: 0 / 0
  161. -- text alignment: 1
  162. -- font id: 0
  163. -- text size: 12
  164. -- style flags: 0
  165. -- line height: 16
  166. -- part name: Quit areas of interest
  167. ----- HyperTalk script -----
  168. on mouseUp
  169.  
  170.   hide bkgnd button "Quit Areas of interest"
  171.   hide bkgnd field "area-of-int"
  172.   ZoomRect the rect of bkgnd field "area-of-int", the rect of bkgnd button "select areas"
  173.   show bkgnd field "Com"
  174.   show bkgnd field "comments"
  175.   put SortItems (bkgnd field "Keyword") into bkgnd field "Keyword"
  176.  
  177. end mouseUp
  178.  
  179.  
  180.  
  181. -- part 26 (button)
  182. -- low flags: 00
  183. -- high flags: 2000
  184. -- rect: left=77 top=307 right=327 bottom=104
  185. -- title width / last selected line: 0
  186. -- icon id / first selected line: 17481 / 17481
  187. -- text alignment: 1
  188. -- font id: 0
  189. -- text size: 12
  190. -- style flags: 0
  191. -- line height: 16
  192. -- part name: New Card
  193. ----- HyperTalk script -----
  194. on mouseUp
  195.  
  196.   doMenu New Card
  197.   put the abbr date into line one of bkgnd field "Date Established"
  198.   put 0 into line two of bkgnd field "Date Established"
  199.   put "Date established" into line one of bkgnd field "Established"
  200.   put "Age of card" into line two of bkgnd field "Established"
  201.   put "    Business" into line two of bkgnd field "BusAdd"
  202.   put "    Adress" into line three of bkgnd field "BusAdd"
  203.   put "     Home" into line two of bkgnd field "HomAdd"
  204.   put "    Adress" into line three of bkgnd field "HomAdd"
  205.   put "Name" into line one of bkgnd field "Nam"
  206.   put "Family" into line one of bkgnd field "Fam"
  207.   put "Home Phone" into line one of bkgnd field "HomPho"
  208.   put "Business Phone" into line one of bkgnd field "BusPho"
  209.   put "Keywords" into line one of bkgnd field "KeyWor"
  210.   put "     * * *  COMMENTS  * * *" into line one of bkgnd field "Com"
  211.   put card field "Mainkeyword" of card "front" into bkgnd field "area-of-int"
  212.  
  213. end mouseUp
  214.  
  215.  
  216.  
  217. -- part 32 (button)
  218. -- low flags: 00
  219. -- high flags: A000
  220. -- rect: left=19 top=242 right=289 bottom=57
  221. -- title width / last selected line: 0
  222. -- icon id / first selected line: 12257 / 12257
  223. -- text alignment: 1
  224. -- font id: 0
  225. -- text size: 12
  226. -- style flags: 0
  227. -- line height: 16
  228. -- part name: Find
  229. ----- HyperTalk script -----
  230. on mouseUp
  231.  
  232.  
  233.   global connect
  234.  
  235.   answer "How do you want me to find this person ?" with "Keyword" or "Letter" or "Name"
  236.   put 2 into connect
  237.  
  238.   -----  Search by name  -----------------------------------------------
  239.  
  240.   if it = "Name" then
  241.     ask "Enter first and/or last name, please :"
  242.     if it = "" then
  243.       answer "        **  No names found !  **"
  244.       put 0 into connect
  245.       exit mouseUp
  246.     else
  247.       find it in field "name"
  248.       if the result is not empty then
  249.         answer "        **  No names found !  **"
  250.         put 0 into connect
  251.         exit mouseUp
  252.       end if
  253.       put 0 into connect
  254.       exit mouseUp
  255.     end if
  256.   end if
  257.  
  258.   --*********************************************************************
  259.   -----  Search by area  -------------------------------------------
  260.  
  261.   if it = "Keyword" then
  262.     go card "front"
  263.     ZoomRect the rect of bkgnd button "Find", the rect of card field "Mainkeyword"
  264.     show card field "Mainkeyword"
  265.     show card button "Quit Find"
  266.     put 2 into connect
  267.     exit mouseUp
  268.   end if
  269.  
  270.   --********************************************************************
  271.  
  272.   -----  Search by a single letter  ------------------------------------
  273.  
  274.   if it = "Letter" then
  275.     answer "Search by 1st ltr of first or last name?" with "first" or "last"
  276.     put 2 into connect
  277.   end if
  278.  
  279.  
  280.   --*********************************************************************
  281.  
  282.   -----  Search by a single letter of their first name  ----------------
  283.  
  284.   if it = "first" then
  285.     ask "Enter the first letter of the first name"
  286.     If it = "" then
  287.       answer "        **  No names found !  **"
  288.       exit mouseUp
  289.     else
  290.       put 1 into numbR
  291.       set the lockScreen to true
  292.       set the cursor to 4
  293.       repeat number of cards times
  294.         if first character of first word of line one of field "Name" is it then
  295.           put first line of field "Name" into line numbR of card field "FoundName" of card "front"
  296.           add 1 to numbR
  297.           go next
  298.         else
  299.           go next
  300.         end if
  301.       end repeat
  302.     end if
  303.  
  304.     go card "front"
  305.     set the lockScreen to false
  306.     if line one of card field "FoundName" = "" then
  307.       answer "      No matches found !"
  308.       exit mouseUp
  309.     else
  310.       ZoomRect the rect of bkgnd button "Find", the rect of card field "FoundName"
  311.       show card field "FoundName"
  312.       show card button "Quit Find"
  313.       exit mouseUp
  314.     end if
  315.   else
  316.  
  317.     --******************************************************************
  318.  
  319.     ask "Enter the first letter of the last name"
  320.     If it = "" then
  321.       answer "        **  No names found !  **"
  322.       exit mouseUp
  323.     else
  324.       put 1 into numbR
  325.       set the lockScreen to true
  326.       set the cursor to 4
  327.       repeat number of cards times
  328.         if first character of last word of line one of field "Name" is it then
  329.           put first line of field "Name" into line numbR of card field "FoundName" of card "front"
  330.           add 1 to numbR
  331.           go next
  332.         else
  333.           go next
  334.         end if
  335.       end repeat
  336.     end if
  337.  
  338.     go card "front"
  339.     set the lockScreen to false
  340.     if line one of card field "FoundName" = "" then
  341.       answer "      No matches found !"
  342.       exit mouseUp
  343.     else
  344.       ZoomRect the rect of bkgnd button "Find", the rect of card field "FoundName"
  345.       show card field "FoundName"
  346.       show card button "Quit Find"
  347.       exit mouseUp
  348.     end if
  349.   end mouseUp
  350.  
  351.  
  352.  
  353. -- part 37 (field)
  354. -- low flags: 00
  355. -- high flags: 0002
  356. -- rect: left=76 top=34 right=50 bottom=336
  357. -- title width / last selected line: 0
  358. -- icon id / first selected line: 0 / 0
  359. -- text alignment: 0
  360. -- font id: 3
  361. -- text size: 10
  362. -- style flags: 0
  363. -- line height: 13
  364. -- part name: Name
  365.  
  366.  
  367. -- part 38 (field)
  368. -- low flags: 00
  369. -- high flags: 0002
  370. -- rect: left=76 top=52 right=68 bottom=336
  371. -- title width / last selected line: 0
  372. -- icon id / first selected line: 0 / 0
  373. -- text alignment: 0
  374. -- font id: 3
  375. -- text size: 10
  376. -- style flags: 0
  377. -- line height: 13
  378. -- part name: Family
  379.  
  380.  
  381. -- part 39 (field)
  382. -- low flags: 00
  383. -- high flags: 0002
  384. -- rect: left=76 top=70 right=125 bottom=336
  385. -- title width / last selected line: 0
  386. -- icon id / first selected line: 0 / 0
  387. -- text alignment: 0
  388. -- font id: 3
  389. -- text size: 10
  390. -- style flags: 0
  391. -- line height: 13
  392. -- part name: Home Address
  393.  
  394.  
  395. -- part 40 (field)
  396. -- low flags: 00
  397. -- high flags: 0007
  398. -- rect: left=162 top=127 right=158 bottom=336
  399. -- title width / last selected line: 0
  400. -- icon id / first selected line: 0 / 0
  401. -- text alignment: 0
  402. -- font id: 3
  403. -- text size: 10
  404. -- style flags: 0
  405. -- line height: 13
  406. -- part name: Home Phone
  407.  
  408.  
  409. -- part 41 (field)
  410. -- low flags: 00
  411. -- high flags: 0002
  412. -- rect: left=76 top=160 right=215 bottom=336
  413. -- title width / last selected line: 0
  414. -- icon id / first selected line: 0 / 0
  415. -- text alignment: 0
  416. -- font id: 3
  417. -- text size: 10
  418. -- style flags: 0
  419. -- line height: 13
  420. -- part name: Business Address
  421.  
  422.  
  423. -- part 42 (field)
  424. -- low flags: 00
  425. -- high flags: 0007
  426. -- rect: left=183 top=217 right=248 bottom=336
  427. -- title width / last selected line: 0
  428. -- icon id / first selected line: 0 / 0
  429. -- text alignment: 0
  430. -- font id: 3
  431. -- text size: 10
  432. -- style flags: 0
  433. -- line height: 13
  434. -- part name: Business Phone
  435.  
  436.  
  437. -- part 43 (field)
  438. -- low flags: 00
  439. -- high flags: 2007
  440. -- rect: left=340 top=54 right=281 bottom=508
  441. -- title width / last selected line: 0
  442. -- icon id / first selected line: 0 / 0
  443. -- text alignment: 0
  444. -- font id: 3
  445. -- text size: 10
  446. -- style flags: 0
  447. -- line height: 13
  448. -- part name: Comments
  449.  
  450.  
  451. -- part 45 (field)
  452. -- low flags: 00
  453. -- high flags: 0007
  454. -- rect: left=133 top=250 right=281 bottom=336
  455. -- title width / last selected line: 0
  456. -- icon id / first selected line: 0 / 0
  457. -- text alignment: 0
  458. -- font id: 3
  459. -- text size: 10
  460. -- style flags: 0
  461. -- line height: 13
  462. -- part name: Keyword
  463.  
  464.  
  465. -- part 47 (field)
  466. -- low flags: 81
  467. -- high flags: 0007
  468. -- rect: left=340 top=34 right=262 bottom=508
  469. -- title width / last selected line: 0
  470. -- icon id / first selected line: 0 / 0
  471. -- text alignment: 0
  472. -- font id: 3
  473. -- text size: 10
  474. -- style flags: 0
  475. -- line height: 13
  476. -- part name: area-of-int
  477. ----- HyperTalk script -----
  478. on mouseUp
  479.  
  480.   -- compute line number of the mouseclick
  481.   get item 2 of the clickloc - item 2 of the rect of me + scroll of me
  482.   put 1 + it div the textHeight of me into lineNum
  483.  
  484.   -- highlight line, use magic button
  485.   set hilite of bkgnd button "hiliter2" to false
  486.   get item 2 of rect of me + lineNum * textHeight of me - scroll of me
  487.   put 1 + it - textHeight of me div 2 into v
  488.   show bkgnd button "hiliter2" at item 1 of loc of bkgnd button "hiliter2",v -- this lights up the button
  489.   set hilite of bkgnd button "hiliter2" to true -- make button black
  490.  
  491.   -- put data selected into sort field
  492.   if line lineNum of bkgnd field "area-of-int" = "" then
  493.     set hilite of bkgnd button "hiliter2" to false
  494.   else
  495.     put " " & line lineNum of bkgnd field "area-of-int" after bkgnd field "Keyword"
  496.     set hilite of bkgnd button "hiliter2" to false
  497.     hide bkgnd button "hiliter2"
  498.   end if
  499.  
  500. end mouseUp
  501.  
  502.  
  503.  
  504.  
  505. -- part 24 (button)
  506. -- low flags: 80
  507. -- high flags: 0000
  508. -- rect: left=341 top=61 right=76 bottom=491
  509. -- title width / last selected line: 0
  510. -- icon id / first selected line: 0 / 0
  511. -- text alignment: 1
  512. -- font id: 0
  513. -- text size: 12
  514. -- style flags: 0
  515. -- line height: 16
  516. -- part name: hiliter2
  517.  
  518.  
  519. -- part 50 (button)
  520. -- low flags: 00
  521. -- high flags: 2000
  522. -- rect: left=353 top=294 right=327 bottom=379
  523. -- title width / last selected line: 0
  524. -- icon id / first selected line: 12501 / 12501
  525. -- text alignment: 1
  526. -- font id: 0
  527. -- text size: 12
  528. -- style flags: 0
  529. -- line height: 16
  530. -- part name: Cut Card
  531. ----- HyperTalk script -----
  532. on mouseUp
  533.  
  534.   answer "Are you sure you want to delete this card ?" with "OK" or "Cancel"
  535.   if it = "OK" then
  536.     doMenu "Delete Card"
  537.   end if
  538.  
  539. end mouseUp
  540.  
  541.  
  542.  
  543. -- part 51 (field)
  544. -- low flags: 01
  545. -- high flags: 0002
  546. -- rect: left=213 top=283 right=311 bottom=336
  547. -- title width / last selected line: 0
  548. -- icon id / first selected line: 0 / 0
  549. -- text alignment: 0
  550. -- font id: 3
  551. -- text size: 10
  552. -- style flags: 0
  553. -- line height: 13
  554. -- part name: Date Established
  555.  
  556.  
  557. -- part 52 (field)
  558. -- low flags: 01
  559. -- high flags: 0002
  560. -- rect: left=124 top=283 right=311 bottom=211
  561. -- title width / last selected line: 0
  562. -- icon id / first selected line: 0 / 0
  563. -- text alignment: 0
  564. -- font id: 3
  565. -- text size: 10
  566. -- style flags: 0
  567. -- line height: 13
  568. -- part name: Established
  569.  
  570.  
  571. -- part 53 (field)
  572. -- low flags: 01
  573. -- high flags: 0002
  574. -- rect: left=2 top=160 right=215 bottom=74
  575. -- title width / last selected line: 0
  576. -- icon id / first selected line: 0 / 0
  577. -- text alignment: 0
  578. -- font id: 3
  579. -- text size: 10
  580. -- style flags: 0
  581. -- line height: 13
  582. -- part name: BusAdd
  583.  
  584.  
  585. -- part 54 (field)
  586. -- low flags: 01
  587. -- high flags: 0002
  588. -- rect: left=2 top=70 right=125 bottom=74
  589. -- title width / last selected line: 0
  590. -- icon id / first selected line: 0 / 0
  591. -- text alignment: 0
  592. -- font id: 3
  593. -- text size: 10
  594. -- style flags: 0
  595. -- line height: 13
  596. -- part name: HomAdd
  597.  
  598.  
  599. -- part 56 (field)
  600. -- low flags: 01
  601. -- high flags: 0002
  602. -- rect: left=2 top=52 right=68 bottom=74
  603. -- title width / last selected line: 0
  604. -- icon id / first selected line: 0 / 0
  605. -- text alignment: 0
  606. -- font id: 3
  607. -- text size: 10
  608. -- style flags: 0
  609. -- line height: 13
  610. -- part name: Fam
  611.  
  612.  
  613. -- part 58 (field)
  614. -- low flags: 01
  615. -- high flags: 0002
  616. -- rect: left=2 top=34 right=50 bottom=74
  617. -- title width / last selected line: 0
  618. -- icon id / first selected line: 0 / 0
  619. -- text alignment: 0
  620. -- font id: 3
  621. -- text size: 10
  622. -- style flags: 0
  623. -- line height: 13
  624. -- part name: Nam
  625.  
  626.  
  627. -- part 60 (field)
  628. -- low flags: 01
  629. -- high flags: 0002
  630. -- rect: left=76 top=127 right=145 bottom=160
  631. -- title width / last selected line: 0
  632. -- icon id / first selected line: 0 / 0
  633. -- text alignment: 0
  634. -- font id: 3
  635. -- text size: 10
  636. -- style flags: 0
  637. -- line height: 13
  638. -- part name: HomPho
  639.  
  640.  
  641. -- part 62 (field)
  642. -- low flags: 01
  643. -- high flags: 0002
  644. -- rect: left=76 top=217 right=235 bottom=181
  645. -- title width / last selected line: 0
  646. -- icon id / first selected line: 0 / 0
  647. -- text alignment: 0
  648. -- font id: 3
  649. -- text size: 10
  650. -- style flags: 0
  651. -- line height: 13
  652. -- part name: BusPho
  653.  
  654.  
  655. -- part 64 (field)
  656. -- low flags: 01
  657. -- high flags: 0002
  658. -- rect: left=76 top=250 right=268 bottom=131
  659. -- title width / last selected line: 0
  660. -- icon id / first selected line: 0 / 0
  661. -- text alignment: 0
  662. -- font id: 3
  663. -- text size: 10
  664. -- style flags: 0
  665. -- line height: 13
  666. -- part name: KeyWor
  667.  
  668.  
  669. -- part 68 (field)
  670. -- low flags: 01
  671. -- high flags: 0002
  672. -- rect: left=340 top=34 right=55 bottom=508
  673. -- title width / last selected line: 0
  674. -- icon id / first selected line: 0 / 0
  675. -- text alignment: 0
  676. -- font id: 3
  677. -- text size: 10
  678. -- style flags: 0
  679. -- line height: 18
  680. -- part name: Com
  681.  
  682.  
  683. -- part 69 (field)
  684. -- low flags: 01
  685. -- high flags: 0000
  686. -- rect: left=15 top=19 right=35 bottom=61
  687. -- title width / last selected line: 0
  688. -- icon id / first selected line: 0 / 0
  689. -- text alignment: 0
  690. -- font id: 3
  691. -- text size: 12
  692. -- style flags: 0
  693. -- line height: 16
  694. -- part name: Time
  695.